package cn.aixmy.main.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serial;

@NoArgsConstructor
@AllArgsConstructor
@Data
@Accessors(chain = true)
@TableName("xm_admin")
public class Admin extends Model<Admin> {
    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id" , type = IdType.AUTO)
    private Integer id;
    /**
     * 账号
     */
    private String user;
    /**
     * 密码
     */
    private String pass;
    /**
     * 用户QQ
     */
    private String qq;
    /**
     * 创建时间
     */
    private Integer regTime;
    /**
     * 最后登录时间
     */
    private Integer lastTime;
    /**
     * 最后登录IP
     */
    private String lastIp;
    /**
     * token
     */
    private String token;
    /**
     * 状态 0=禁用 1=正常
     */
    private Integer status;
    /**
     * 角色ID
     */
    private Integer role;
    /**
     * 用户余额
     */
    private Integer money;

    public Admin(String user, String pass) {
        this.user = user;
        this.pass = pass;
    }
}
